{extend name="base" /} {block name="css"}
{/block} {block name="body"}
<style>
.layui-layedit-iframe iframe{
    height:500px!important;
}
</style>
<!--tab标签-->
<div class="layui-tab-brief">

    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" data-url="{:url('admin/articles/update')}" localtion-url="{:url('admin/articles/index')}">
                <div class="layui-row layui-col-space15 layui-form-item">
                    <div class="layui-col-md3">
                        <label class="layui-form-label">所在专栏</label>
                        <div class="layui-input-block">
                            <select lay-verify="required" name="tid" lay-filter="tid"> 
                                    {volist name="tptcs" id="vo"}
                                    <option {if condition="$tptca['tid'] eq $vo['id']"}selected="selected"{/if} value="{$vo.id}">{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' --';}{/php}{/neq}{$vo.name}</option>
                                    {/volist}
                 </select>
                        </div>
                    </div>
                    <div class="layui-col-md9">
                        <label for="L_title" class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="text" id="L_title" name="title" value="{$tptca.title}" required="" lay-verify="required" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">

                    <label class="layui-form-label">封面</label>


                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="image">
                                            <i class="layui-icon">&#xe67c;</i>上传图片
                                        </button>
                        <input type="text" id="coverpic" name="coverpic" value="{$tptca.coverpic}"  placeholder="如不填可以自动获取内容中的第一张图" class="layui-input" style="position: absolute;left: 111px;top: 0px;width: 500px;">
                    </div>

                </div>
                <div class="layui-form-item">

                    <label class="layui-form-label"></label>

                    <div class="layui-upload-list">
                        {if $tptca.coverpic}
                        <img class="layui-upload-img" id="picshow" style="max-height: 200px" src="__ROOT__{$tptca.coverpic}"> {/if}
                    </div>
                </div>
                <div class="layui-form-item" style="margin-top: 20px;margin-bottom: 10px;">
                    <div class="layui-inline">
                        <label class="layui-form-label">外链地址</label>
                        <div class="layui-inline" style="margin-left:0px;">
                            <input name="outlink" type="text" placeholder="点击标题可直接跳转（需以http或开头）" value="{$tptca.outlink}" autocomplete="off" class="layui-input" style="width: 400px;float: left;">
                        </div>
                    </div>
                </div>
                <textarea id="content" name="content" lay-verify="content" style="height:800px;width: 100%;">
                    {$tptca.content}</textarea>
                <!-- <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-inline">
                     
                    </div>
                </div> -->
                {:hook('addVideo',array('id'=>$tptca['id'],'type'=>1))}
                {:hook('attachlinkadd',array('id'=>$tptca['id'],'type'=>1))}
                <div class="layui-form-item">

                    <label class="layui-form-label">定时发布</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="time" id="time" value="{$tptca.time|date='Y-m-d H:i:s',###                                                                                                                 }">
                    </div>
                    <div class="layui-form-mid layui-word-aux"><a target="_blank" href="http://www.laysns.com/thread/2479.html">使用说明</a></div>
                </div>
                <div class="layui-form-item">
                    
                    <label class="layui-form-label">关键字</label>
                    <div class="layui-input-block">
                        <input name="keywords" type="text" value="{$tptca.keywords}" placeholder="英文逗号分隔" autocomplete="off" class="layui-input">
                    </div>
              
              </div>
                <div class="layui-form-item">
                    
                        <label class="layui-form-label">审核备注</label>
                        <div class="layui-input-block">
                            <input name="remarks" type="text" placeholder="可填写审核拒绝的原因" value="{$tptca.remarks}" autocomplete="off" class="layui-input">
                        </div>
                  
                </div>
                <input type="hidden" name="id" value="{$tptca.id}">
                <div class="btable-paged">
                    <div class="layui-main">
                        <div class="formbtngroup">
                            <div class="layui-input-inline">
                                <input type="radio" name="open" value="1" title="同意" {if $tptca.open eq '1'}checked{/if}>
                                <input type="radio" name="open" value="2" title="不同意" {if $tptca.open eq '2'}checked{/if}> <input type="radio" name="open" value="-1" title="关闭" {if $tptca.open eq '-1'}checked{/if}>
                            </div>

                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formadd">更新</button>
                            <button onclick="history.go(-1);return false;" class="layui-btn layui-btn-primary layui-btn-sm">返回</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block} {block name="js"}
<script src="__ADMIN__/plugins/ace/ace.js"></script>
<script type="text/javascript" src="__ADMIN__/js/formadd.js"></script>

{/block}